package com.demo.config;

import com.demo.utils.LogUtils;
import org.apache.logging.log4j.Logger;

/**
 * author:王蒙蒙
 * date创建日期:2025/7/24
 * 类注释说明:
 **/



public class ApiEndpoints {
    private static final Logger log = LogUtils.getLogger();
    public static final String RICHTEXT_GET = "/api/richtext/get";
    public static final String Login_POST = "/api/user/login";
//    public static final String Area_POST = "/api/area/add";
    public static final String RONCOO_ADDSER = "/api/cart/add";

    // 从配置加载基础URL
    private static String baseUrl = ConfigLoader.getProperty("api.base.url");

    public static void setBaseUrl(String url) {
        baseUrl = url;
    }

    public static String getFullUrl(String endpoint) {
        log.info(baseUrl + endpoint);
        return baseUrl + endpoint;
    }
}

